package org.budo.phone.api;

import org.budo.phone.api.response.AgentOffWorkResponse;
import org.budo.phone.api.response.AgentOnWorkResponse;
import org.budo.phone.api.response.AgentServiceEndResponse;
import org.budo.phone.api.response.CreateQueueResponse;
import org.budo.phone.api.response.CreateSubAccountResponse;

/**
 * 由各平台实现的，供业务系统调用的，用于发送指令的接口 TODO appId 应该放在参数上还是放在属性上?
 * 
 * @author limingwei
 * 
 * @see org.budo.phone.api.BudoPhoneEvent
 */
public interface BudoPhoneApi {
    // 发起呼叫，有用户手动或半自动的在sip客户端上输入被叫号码发起呼叫

    /**
     * 创建子账户
     */
    CreateSubAccountResponse createSubAccount(String appId, String name);

    /**
     * 创建队列
     */
    CreateQueueResponse createQueue(String appId, String queueType, String typeDes);

    /**
     * 坐席上班
     */
    AgentOnWorkResponse agentOnWork(String appId, String number, String agentId);

    /**
     * 坐席下班
     */
    AgentOffWorkResponse agentOffWork(String appId, String number, String agentId, String agentType);

    /**
     * 挂机
     */
    AgentServiceEndResponse agentServiceEnd(String appId, String callId, String agentId);
}